<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/addRepOffice.do"/>
<script src="/chiptrac/jsp/sales/function.js"></script>

<html:html>

<HEAD><TITLE>ChipTrac - Add a new Rep Office</TITLE>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<script language='javascript'>
function addRepOffice() {

	var pa=document.getElementById("message");
	var repoffice= document.addRepOfficeForm.newrepoffice.value;
	var success=true;
	if(!(isCharacters(repoffice))){
	pa.innerHTML = "Rep. Office should be a numeric or a character...";	
	success=false;
}
  if(success){
    document.addRepOfficeForm.submit();
    }
}

function closeWindow() {
    window.opener.navigate(window.opener.document.location.href);
    window.close();
}

// SharatH on July 31, 2003
function showErrorReportPage()
{
    newWindow = window.open ('<%=chipTracContext%>/reportProblem.do','reportProblem','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=750,height=400,resizable=no');
    newWindow.focus();
}

</script>


<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor='#ffffff' leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">


<html:form name="addRepOfficeForm" type="com.scalar.chiptrack.sales.forms.AddRepOfficeForm" action="/addRepOffice.do?action=insertRepOffice">

<table bgcolor='FDF5E6' border="0" width="90%" align=center>

    <tr><td colspan='3' bgcolor="#993333" align='center'><font class='NArialW'><font color='#FFFFFF'>Add New Rep.Office</font></font></td></tr>
    <tr><td colspan='3'><img height=20 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td></tr>

    <tr><td colspan='3'><chiptrack:info styleClass="NArialL"/></td></tr>
    <tr><td colspan='3'><chiptrack:errors styleClass="NArialL"/></td></tr>
    
   <tr><td colspan='3'><strong><font face="Verdana" size="-5" align="center" color="#ff0000" id="message"></font></td></tr>

    
    <tr>
        <td width="20%"><font class="NArialL" >&nbsp;</font></td>
        <td width="40%"><font class="NArialL" >New RepOffice:</font></td>
        <td width="40%"><html:text name='addRepOfficeForm' property='newrepoffice' size='15' maxlength='30' styleClass='txfield'/></td>
    </tr>

    <tr><td colspan=3><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>

    <tr><td colspan=3 align=center>
    <a href="javascript:addRepOffice()"><img onMouseOver="window.status='Click here to enter the RepOffice';return true"  border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="javascript:closeWindow();"><img onMouseOver="window.status='Click here to close this window ';return true"  border="0" src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" width="53" height="17"></a>
    </td></tr>

    <tr><td colspan=3><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>

    <tr><td colspan=3 align=center><a href="javascript:closeWindow();" onMouseOver="window.status='Click here to close this window';return true"><font class='NArialL'>Close this window</font></a></td></tr>

    <tr><td colspan=3><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>

</table>

</html:form>


</BODY>

</html:html>